package com.fz.entity;

import com.fz.core.BaseEntity;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 存储购物车中商品信息
 * </p>
 *
 * @author hyr
 * @since 2025-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Cart extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 商品ID（外键）
     */
    private Long goodsId;

    /**
     * 用户ID（外键）
     */
    private Long userId;

    /**
     * 门店ID（外键）
     */
    private Long storeId;

    /**
     * 商品数量
     */
    private Integer count;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除（1=删除）
     */
    private Integer isDeleted;


    public Cart(Long goodsId, Long userId, Integer count, LocalDateTime format)
    {
        this.goodsId=goodsId;
        this.userId=userId;
        this.count=count;
        this.createTime=format;
    }
}
